import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
import router from './router'
import './assets/styles.css'
import App from './App.vue'
import { useRegisterSW } from 'virtual:pwa-register/vue'

useRegisterSW({
  immediate: true,
  onRegistered(r) {
    r &&
      setInterval(() => {
        r.update()
      }, 60 * 1000)
  }
})

createApp(App).use(createPinia().use(piniaPersist)).use(router).mount('#app')
